home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 9 / Amoszine 9 (Disk 3 of 3).adf / AJC_Source.lha / AJC-QUICKLIST.AMOS / AJC-QUICKLIST.amosSourceCode
AMOS Source Code  |  1995-08-01  |  4KB  |  222 lines

  1. Set Buffer 100
  2. '
  3. ' The Quicklist Routine From Magnetic Fiction (available NOW from F1!!)
  4. ' By Andrew Campbell of Black Dragon Design. 
  5. '
  6. ' Obviously if you've never seen the program you won't understand the
  7. ' titles in the list, but it is a good routine for making menus that 
  8. ' can be controlled via the mouse. 
  9. '  
  10. ' Hope it comes in useful! - AJC 
  11. '  
  12.  
  13. Dim FILENAME$(40),_QUICKLIST$(40)
  14.  
  15. Global FILENAME$(),_QUICKLIST$()
  16. Global _NUMBER_OF_STORIES
  17. Global _QUICK_UPDATE
  18. Global _QUICKLIST_POS
  19.  
  20. _SCREENY=6
  21.  
  22. Default Palette 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  23. Screen Open 0,640,240,16,Hires : Curs Off : Flash Off : Hide On : Cls 0
  24.  
  25. _JSTEP=1
  26. _NUMBER_OF_STORIES=32
  27. _QUICKLIST_POS=2
  28. _INIT_VARIABLES
  29. _QUICKLIST
  30.  
  31.  
  32. Procedure _INIT_VARIABLES
  33.  
  34. ' *** GET STORY NAMES
  35.  
  36. Restore S1
  37. For I=1 To _NUMBER_OF_STORIES
  38.  Read FILENAME$(I)
  39. Next I
  40.  
  41. ' *** GET QUICKLIST INFORMATION
  42.  
  43. Restore S5
  44. For I=1 To _NUMBER_OF_STORIES
  45.  NEW$=String$(".",60)
  46.  _QUICKLIST$(I)=FILENAME$(I)+NEW$
  47.  _QUICKLIST$(I)=Left$(_QUICKLIST$(I),40)
  48.  Read FFF$
  49.  _QUICKLIST$(I)=_QUICKLIST$(I)+FFF$
  50. Next I
  51.  
  52. S1:
  53. Data "Front Page"
  54. Data "Introduction"
  55. Data "The Survival Game"
  56. Data "The Art Of Fear"
  57. Data "Night Watchman"
  58. Data "Under The House"
  59. Data "Dutch #1- The Laocoon"
  60. Data "Dutch #2- The Way Of God"
  61. Data "Dutch #3- Changes"
  62. Data "Photo Shoot"
  63. Data "Black Mosaic"
  64. Data "The Customer"
  65. Data "In The Bogs"
  66. Data "Zebraskin"
  67. Data "Between The Sexes"
  68. Data "Dream Before Dying"
  69. Data "Pops and Mungo"
  70. Data "Deepday"
  71. Data "Thorne Island"
  72. Data "Twisted Tales"
  73. Data "Reason"
  74. Data "Faces In The Carpet"
  75. Data "The Wishing Tree"
  76. Data "The Girl And The Biker"
  77. Data "Midsummer Comes"
  78. Data "Turnaround"
  79. Data "Bad Situations"
  80. Data "High Anxiety"
  81. Data "Visitcha"
  82. Data "About The Stories"
  83. Data "E-Fiction"
  84. Data "Back Page"
  85.  
  86. S5:
  87. Data "-"
  88. Data "Andrew Campbell"
  89. Data "Andrew Campbell"
  90. Data "Andrew Campbell"
  91. Data "Andrew Campbell"
  92. Data "Andrew Campbell"
  93. Data "Andrew Campbell"
  94. Data "Andrew Campbell"
  95. Data "Andrew Campbell"
  96. Data "......Flick G-C"
  97. Data "Andrew Campbell"
  98. Data "Andrew Campbell"
  99. Data "Andrew Campbell"
  100. Data "Andrew Campbell"
  101. Data "Andrew Campbell"
  102. Data "...Kevin Murphy"
  103. Data "Andrew Campbell"
  104. Data "Andrew Campbell"
  105. Data "Andrew Campbell"
  106. Data ".Linette Voller"
  107. Data "....Neale Grant"
  108. Data "Andrew Campbell"
  109. Data "Andrew Campbell"
  110. Data "Andrew Campbell"
  111. Data "Andrew Campbell"
  112. Data "Andrew Campbell"
  113. Data "Andrew Campbell"
  114. Data "..Mike Richmond"
  115. Data "Andrew Campbell"
  116. Data "Andrew Campbell"
  117. Data "Andrew Campbell"
  118. Data "-"
  119.  
  120. End Proc
  121.  
  122. Procedure _FADE_POINTER
  123.  
  124.  For I=16 To 20 : Colour I,$F0 : Next I
  125.  
  126. End Proc
  127. Procedure _SCREENOFF
  128.  
  129.          Auto View Off : Screen Hide 2 : Screen Hide 0 : Screen Hide 1
  130.  
  131. End Proc
  132. Procedure _SCREENON
  133.  
  134.           Wait 4
  135.           Screen Show 2 : Screen Show 0 : Screen Show 1
  136.           Auto View On 
  137.           Wait 4
  138.           View 
  139.  
  140. End Proc
  141.  
  142. Procedure _QUICKLIST
  143.  
  144.    Auto View Off 
  145.    Screen Open 7,640,256,4,Hires
  146.    Curs Off : Flash Off : Cls 0 : Hide On 
  147.    Screen Display 7,,500,,
  148.    Pen 3 : Paper 0
  149.    Locate 0,0 : Centre "LEFT BUTTON TO CHOOSE / RIGHT TO EXIT"
  150.    Pen 1
  151.    For I=_QUICKLIST_POS To _NUMBER_OF_STORIES-1 : Gosub MAGGOT : Next I
  152.    Auto View On 
  153.    View 
  154.    Limit Mouse 131,44 To 443,294
  155.    _FADE_POINTER
  156.    Show On 
  157.    Palette 0,$A0,$AA,$F00
  158.    
  159.    For I=500 To 45 Step -1
  160.       Update 
  161.       Screen Display 7,,I,,
  162.    Next I
  163.    
  164.    Wait 2
  165.    
  166.    HIGH=0
  167.    
  168.    MAG:
  169.    
  170.    Repeat 
  171.  
  172.       Y=Y Screen(Y Mouse)
  173.       
  174.       If HIGH>0 and Y/8<>LASTY/8
  175.          I=LASTY/8
  176.          Gosub MAGGOT
  177.       End If 
  178.       
  179.       If Y>16 and Y<(_NUMBER_OF_STORIES)*8
  180.          I=Y/8
  181.          Gosub MAGGOT2
  182.          HIGH=1
  183.          LASTY=Y
  184.       End If 
  185.       
  186.    Until Mouse Key
  187.    
  188.    If Mouse Key=1
  189.       I=Y/8
  190.       If I>1 and I<_NUMBER_OF_STORIES
  191.          _CURRENT_STORY=I
  192.          If _CURRENT_STORY<_NUMBER_OF_STORIES
  193.             Fade 1
  194.             Wait 15
  195.             Screen Close 7
  196.             Pop Proc
  197.          End If 
  198.       End If 
  199.    End If 
  200.    
  201.    If Mouse Key=2
  202.       Screen Close 7
  203.       Pop Proc
  204.    End If 
  205.    
  206.    Goto MAG
  207.    
  208.    MAGGOT:
  209.    Pen 1
  210.    Locate 0,I
  211.    Centre _QUICKLIST$(I)
  212.    Return 
  213.    
  214.    MAGGOT2:
  215.    Pen 1
  216.    Inverse On 
  217.    Locate 0,I
  218.    Centre _QUICKLIST$(I)
  219.    Inverse Off 
  220.    Return 
  221.    
  222. End Proc